Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Discover] Fix lazy loading #6041

Merged
merged 2 commits into from
Mar 5, 2024

Conversation

ashwin-pc
Copy link
Member

@ashwin-pc ashwin-pc commented Mar 5, 2024

Description

The sentinel object in the legacy table on first page load (without query params) was being set after the component rendered for the first time. This caused the observer to not be set properly. This change triggers the effect only once the sentinel is actually attached to the DOM node

Issues Resolved

fixes #6033

Screenshot

Before:

Screen.Recording.2024-03-05.at.12.03.16.PM.mov

After:

Screen.Recording.2024-03-05.at.12.04.03.PM.mov

Testing the changes

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>
Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>
Copy link

codecov bot commented Mar 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.13%. Comparing base (49d1649) to head (89d368d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6041      +/-   ##
==========================================
- Coverage   67.15%   67.13%   -0.02%     
==========================================
  Files        3317     3317              
  Lines       64016    64016              
  Branches    10256    10256              
==========================================
- Hits        42991    42979      -12     
- Misses      18533    18545      +12     
  Partials     2492     2492              
Flag Coverage Δ
Linux_1 31.63% <ø> (ø)
Linux_2 55.20% <ø> (ø)
Linux_3 44.59% <ø> (-0.02%) ⬇️
Linux_4 35.16% <ø> (ø)
Windows_1 31.65% <ø> (-0.03%) ⬇️
Windows_2 55.17% <ø> (ø)
Windows_3 44.60% <ø> (ø)
Windows_4 35.16% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ananzh
Copy link
Member

ananzh commented Mar 5, 2024

Resolve #6033

@ananzh ananzh merged commit bb8155a into opensearch-project:main Mar 5, 2024
70 checks passed
ananzh pushed a commit that referenced this pull request Mar 5, 2024
* adds callback ref to lazy loading sentinel
---------

Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>
SuZhou-Joe pushed a commit to SuZhou-Joe/OpenSearch-Dashboards that referenced this pull request Apr 7, 2024
* adds callback ref to lazy loading sentinel
---------

Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>
SuZhou-Joe pushed a commit to ruanyl/OpenSearch-Dashboards that referenced this pull request Apr 7, 2024
* adds callback ref to lazy loading sentinel
---------

Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 23, 2024
* adds callback ref to lazy loading sentinel
---------

Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>
(cherry picked from commit bb8155a)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
@ananzh ananzh added the v2.14.0 label Apr 24, 2024
AMoo-Miki added a commit that referenced this pull request Apr 25, 2024
* adds callback ref to lazy loading sentinel
---------

Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>
(cherry picked from commit bb8155a)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Miki <miki@amazon.com>
Co-authored-by: Anan Zhuang <ananzh@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG][Discover] Scroll down won't auto load more rows
3 participants